var arr = ["",""];

    var str = "abcawertyhdaabdchdsyoi";
    var index =-1;
    var len=0;
    var le=0;

for(var t = 1 ; t<str.length;t++){
    if(le <= index){
            console.log(index);
            le = index;
        }
    for(var j = t ; j<str.length;j++){
       
        for(var i = j+1 ; i<str.length-len;i++){
       
        if(str[j]==str[i] && j!=i){

            len = str.length-i-1;
            index=i;
           
            console.log(index);
        }
        if(i==1){
            le = index;
        }
       
    }
   
        }
       
}


console.log(index);

var xiaoming = {
    name: '小明',
    birth: 1990,
    school: 'No.1 Middle School',
    height: 1.70,
    weight: 65,
    score: null
};

xiaoming.name; // '小明'
xiaoming.birth; // 1990


























